//
//  TTNotifyViewCell.m
//  TaoTuo
//
//  Created by admin on 2019/10/22.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTNotifyViewCell.h"

@interface TTNotifyViewCell ()

@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *timeLabel;

@end

@implementation TTNotifyViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self setupSubviews];
        
    }
    return self;
}

- (void)setModel:(TTNotifyModel *)model
{
    _model = model;
    self.titleLabel.text = model.Title;
    self.timeLabel.text = model.CreateTime;
}

- (void)setupSubviews
{
    _timeLabel = [UILabel labelWithTitle:@"" color:UIColorHex(999999) fontSize:12];
    [self.contentView addSubview:_timeLabel];
    [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).mas_offset(-10);
        make.centerY.equalTo(self.contentView);
    }];
    
    _titleLabel = [UILabel labelWithTitle:@"" color:UIColorHex(333333) fontSize:15];
    [self.contentView addSubview:_titleLabel];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.right.lessThanOrEqualTo(self.timeLabel.mas_left).mas_offset(-5);
        make.centerY.equalTo(self.contentView);
    }];
    
    
}


@end
